﻿<Application x:Class="BusinessIntelligenceToolkit.Demo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Sys="clr-namespace:System;assembly=mscorlib"
             StartupUri="WeatherForecast.xaml">
    <Application.Resources>
        <FontFamily x:Key="IconFontFamily">Tahoma</FontFamily>
        <FontWeight x:Key="IconFontWeight">Normal</FontWeight>
        <FontFamily x:Key="MessageFontFamily">Tahoma</FontFamily>
        <FontWeight x:Key="MessageFontWeight">Normal</FontWeight>
        <FontFamily x:Key="CaptionFontFamily">Tahoma</FontFamily>
        <FontWeight x:Key="CaptionFontWeight">Bold</FontWeight>

        <Geometry x:Key="Checkmark">M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z</Geometry>
        <Geometry x:Key="CheckBoxMark">F1 M 14.3268,1.30162L 14.6279,1.83659C 12.6725,3.25875 10.8611,5.05914 9.19373,7.23778C 7.5264,9.41643 6.32258,11.5502 5.58227,13.6391L 5.14196,13.9382C 4.76209,14.1907 4.4351,14.4444 4.16099,14.6991C 4.11351,14.451 3.98293,14.0523 3.76925,13.5029L 3.53938,12.9148C 3.0408,11.6455 2.61939,10.7583 2.27513,10.2532C 1.93087,9.74815 1.55909,9.47458 1.1598,9.43249C 1.69939,8.97394 2.16991,8.74467 2.57136,8.74467C 3.12606,8.74467 3.73364,9.4923 4.39409,10.9876L 4.75346,11.7917C 5.93408,9.61413 7.35967,7.60828 9.03024,5.7741C 10.7008,3.93992 12.4663,2.44909 14.3268,1.30162 Z</Geometry>
        <Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>

        <Sys:Double x:Key="DefaultSpacing">4</Sys:Double>
        <Sys:Double x:Key="MediumSpacing">8</Sys:Double>
        <Sys:Double x:Key="LargeSpacing">12</Sys:Double>
        <Sys:Double x:Key="ExtraLargeSpacing">16</Sys:Double>
        <Sys:Double x:Key="IconFontSize">10</Sys:Double>
        <Sys:Double x:Key="CaptionFontSize">12</Sys:Double>
        <Sys:Double x:Key="MessageFontSize">11</Sys:Double>

        <Thickness x:Key="LargeMargin" Left="{StaticResource DefaultSpacing}" Top="{StaticResource MediumSpacing}" Right="{StaticResource LargeSpacing}" Bottom="{StaticResource ExtraLargeSpacing}" />
        <Thickness x:Key="DefaultLeftMargin" Left="{StaticResource DefaultSpacing}" Top="0" Right="0" Bottom="0" />

        <Color x:Key="MainWindowBackgroundColor">#FF333333</Color>
        <Color x:Key="MenuBackgroundColor">#FF3A3A3A</Color>
        <Color x:Key="DialogBackgroundColor">#FF666666</Color>
        <Color x:Key="PaletteColor">#FF595959</Color>
        <Color x:Key="Text1Color">#FFFFFFFF</Color>
        <Color x:Key="WhiteColor">#FFFFFFFF</Color>
        <Color x:Key="ButtonDefaultBackgroundColor">#FF595959</Color>
        <Color x:Key="ButtonMouseOverBackgroundColor">#FFAAAAAA</Color>
        <Color x:Key="ButtonPressedBackgroundColor">#FF424242</Color>
        <Color x:Key="ButtonDisabledBackgroundColor">#FF666666</Color>
        <Color x:Key="ButtonDefaultTextColor">#FFFFFFFF</Color>
        <Color x:Key="ButtonMouseOverTextColor">#FF1A1A1A</Color>
        <Color x:Key="ButtonDisabledTextColor">#FF808080</Color>
        <Color x:Key="ButtonDefaultBorderColor">#FF333333</Color>
        <Color x:Key="ButtonMouseOverBorderColor">#FF424242</Color>
        <Color x:Key="ButtonPressedBorderColor">#FF1A1A1A</Color>


        <!--<Color x:Key="ButtonIsDefaultBorderColor">#FF9BB1C5</Color>-->
        <Color x:Key="ButtonIsDefaultBorderColor">#1968AA</Color>


        <Color x:Key="ButtonIsFocusedBorderColor">#FFE5E5E5</Color>
        <Color x:Key="ButtonDisabledBorderColor">#FF424242</Color>
        <Color x:Key="ButtonDefaultColor">#FF808080</Color>
        <Color x:Key="ButtonDefaultedColor">#FF9BB1C5</Color>
        <Color x:Key="ButtonOverColor">#FFAAAAAA</Color>
        <Color x:Key="ButtonSelectColor">#FFCCCCCC</Color>
        <Color x:Key="ButtonFocusedBorderColor">#FFE5E5E5</Color>
        <Color x:Key="ButtonSelectionColor">#FF999999</Color>
        <Color x:Key="ControlFocusBorderColor">#FFE5E5E5</Color>
        <Color x:Key="TitleGradStart">#FF616161</Color>
        <Color x:Key="TitleGradEnd">#FF444444</Color>
        <Color x:Key="BackgroundColor">#FF333333</Color>
        <Color x:Key="DisabledTextColor">#FF808080</Color>
        <Color x:Key="DarkColor">#FF1A1A1A</Color>
        <Color x:Key="RecessedColor">#FF424242</Color>
        <Color x:Key="PopUpColor">#FF666666</Color>
        <Color x:Key="ListSelectedTextColor">#FF333333</Color>
        <Color x:Key="ListBackgroundColor">#FFAAAAAA</Color>
        <Color x:Key="DarkBackgroundColor">#FF1A1A1A</Color>
        <Color x:Key="ListSelectionGradStartColor">#FF9A9A9A</Color>
        <Color x:Key="ListSelectionGradEndColor">#FFE3E3E3</Color>
        <Color x:Key="ToggleButtonDefaultBorderColor">#FF424242</Color>
        <Color x:Key="ToggleButtonFocusedBorderColor">#FFE5E5E5</Color>
        <Color x:Key="ToggleButtonDisabledTextColor">#FF424242</Color>
        <Color x:Key="LayerChild0Color">#FF383838</Color>
        <Color x:Key="LayerChild1Color">#FF5C5C5C</Color>
        <Color x:Key="LayerChild2Color">#FF707070</Color>
        <Color x:Key="SliderColor">#FF666666</Color>

        <Color x:Key="SliderGradStartMouseHover">#424242</Color>
        <Color x:Key="SliderGradEndMouseHover">#4C4C4C</Color>

        <Color x:Key="SliderGradEnd">CornflowerBlue</Color>
        <Color x:Key="SliderGradStart">#06286F</Color>




        <Color x:Key="TabSelectionColor">#808080</Color>
        <Color x:Key="MenuTextColor">#FFFFFFFF</Color>

        <SolidColorBrush x:Key="MenuTextBrush" Color="{StaticResource MenuTextColor}" />
        <SolidColorBrush x:Key="TabSelectionBrush" Color="{StaticResource TabSelectionColor}" />
        <SolidColorBrush x:Key="LayerChild0Brush" Color="{StaticResource LayerChild0Color}" />
        <SolidColorBrush x:Key="LayerChild1Brush" Color="{StaticResource LayerChild1Color}" />
        <SolidColorBrush x:Key="LayerChild2Brush" Color="{StaticResource LayerChild2Color}" />
        <SolidColorBrush x:Key="ToggleButtonDisabledTextBrush" Color="{StaticResource ToggleButtonDisabledTextColor}" />
        <SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="{StaticResource ToggleButtonDefaultBorderColor}" />
        <SolidColorBrush x:Key="ToggleButtonFocusedBorderBrush" Color="{StaticResource ToggleButtonFocusedBorderColor}" />
        <SolidColorBrush x:Key="ListBackgroundBrush" Color="{StaticResource ListBackgroundColor}" />
        <SolidColorBrush x:Key="ListSelectedTextBrush" Color="{StaticResource ListSelectedTextColor}" />
        <SolidColorBrush x:Key="PopUpBrush" Color="{StaticResource PopUpColor}" />
        <SolidColorBrush x:Key="RecessedBrush" Color="{StaticResource RecessedColor}" />
        <SolidColorBrush x:Key="DarkBrush" Color="{StaticResource DarkColor}" />
        <SolidColorBrush x:Key="DisabledTextBrush" Color="{StaticResource DisabledTextColor}" />
        <SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}" />
        <SolidColorBrush x:Key="MenuBackgroundBrush" Color="{StaticResource MenuBackgroundColor}" />
        <SolidColorBrush x:Key="MainWindowBackgroundBrush" Color="{StaticResource MainWindowBackgroundColor}" />
        <SolidColorBrush x:Key="DialogBackgroundBrush" Color="{StaticResource DialogBackgroundColor}" />
        <SolidColorBrush x:Key="PaletteBrush" Color="{StaticResource PaletteColor}" />
        <SolidColorBrush x:Key="Text1Brush" Color="{StaticResource Text1Color}" />
        <SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource WhiteColor}" />
        <SolidColorBrush x:Key="ControlFocusBorderBrush" Color="{StaticResource ControlFocusBorderColor}" />
        <SolidColorBrush x:Key="ButtonDefaultBackgroundBrush" Color="{StaticResource ButtonDefaultBackgroundColor}" />
        <SolidColorBrush x:Key="ButtonMouseOverBackgroundBrush" Color="{StaticResource ButtonMouseOverBackgroundColor}" />
        <SolidColorBrush x:Key="ButtonPressedBackgroundBrush" Color="{StaticResource ButtonPressedBackgroundColor}" />
        <SolidColorBrush x:Key="ButtonDisabledBackgroundBrush" Color="{StaticResource ButtonDisabledBackgroundColor}" />
        <SolidColorBrush x:Key="ButtonDefaultTextBrush" Color="{StaticResource ButtonDefaultTextColor}" />
        <SolidColorBrush x:Key="ButtonMouseOverTextBrush" Color="{StaticResource ButtonMouseOverTextColor}" />
        <SolidColorBrush x:Key="ButtonDisabledTextBrush" Color="{StaticResource ButtonDisabledTextColor}" />
        <SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="{StaticResource ButtonDefaultBorderColor}" />
        <SolidColorBrush x:Key="ButtonMouseOverBorderBrush" Color="{StaticResource ButtonMouseOverBorderColor}" />
        <SolidColorBrush x:Key="ButtonPressedBorderBrush" Color="{StaticResource ButtonPressedBorderColor}" />
        <SolidColorBrush x:Key="ButtonIsDefaultBorderBrush" Color="{StaticResource ButtonIsDefaultBorderColor}" />
        <SolidColorBrush x:Key="ButtonIsFocusedBorderBrush" Color="{StaticResource ButtonIsFocusedBorderColor}" />
        <SolidColorBrush x:Key="ButtonDisabledBorderBrush" Color="{StaticResource ButtonDisabledBorderColor}" />
        <SolidColorBrush x:Key="ButtonDefaultBrush" Color="{StaticResource ButtonDefaultColor}" />
        <SolidColorBrush x:Key="ButtonDefaultedBrush" Color="{StaticResource ButtonDefaultedColor}" />
        <SolidColorBrush x:Key="ButtonOverBrush" Color="{StaticResource ButtonOverColor}" />
        <SolidColorBrush x:Key="ButtonSelectBrush" Color="{StaticResource ButtonSelectColor}" />
        <SolidColorBrush x:Key="ButtonFocusedBorderBrush" Color="{StaticResource ButtonFocusedBorderColor}" />
        <SolidColorBrush x:Key="SliderBrush" Color="{StaticResource SliderColor}" />
        <SolidColorBrush x:Key="RedBrush" Color="Red" />

        <LinearGradientBrush x:Key="SliderGrad" StartPoint="0,0" EndPoint="1,0">
            <LinearGradientBrush.GradientStops>
                <GradientStop Color="{StaticResource SliderGradStart}" Offset="0" />
                <GradientStop Color="{StaticResource SliderGradEnd}" Offset="1" />
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="SliderGradMouseHover" StartPoint="0,0" EndPoint="1,0">
            <LinearGradientBrush.GradientStops>
                <GradientStop Color="{StaticResource SliderGradStartMouseHover}" Offset="0" />
                <GradientStop Color="{StaticResource SliderGradEndMouseHover}" Offset="1" />
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>

        <!--Scrollbar Buttons-->
        <Style x:Key="ScrollButtons" TargetType="{x:Type RepeatButton}">
            <Setter Property="Focusable" Value="false" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Border Name="Border" Background="Transparent">
                            <ContentPresenter Name="ContentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!--Scrollbar Thumbs-->
        <Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Grid Name="Grid">
                            <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent" />
                            <Rectangle Name="Rectangle1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="7" Height="Auto" RadiusX="4" RadiusY="4" Fill="{TemplateBinding Background}" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="Tag" Value="Horizontal">
                                <Setter TargetName="Rectangle1" Property="Width" Value="Auto" />
                                <Setter TargetName="Rectangle1" Property="Height" Value="7" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ScrollBar}">
            <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrush}}" />
            <!--<Setter Property="Background" Value="{DynamicResource SliderGrad}" />-->
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Width" Value="12" />
            <Setter Property="Opacity" Value="0.6" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollBar}">
                        <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidth}}" Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="18" />
                                <RowDefinition Height="0.00001*" />
                                <RowDefinition MaxHeight="18" />
                            </Grid.RowDefinitions>
                            <RepeatButton x:Name="DecreaseRepeat" Cursor="Hand" Command="ScrollBar.LineUpCommand" Style="{DynamicResource ScrollButtons}" Foreground="{DynamicResource ButtonDefaultBrush}">
                                <Path x:Name="DecreaseArrow" Data="F1 M 3.5,0L 0,7L 7,7L 3.5,0 Z " HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource SliderGrad}" />
                            </RepeatButton>
                            <Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="true" Focusable="false" Cursor="Hand">
                                <Track.Thumb>
                                    <Thumb x:Name="Thumb" Background="{DynamicResource SliderGrad}" Style="{DynamicResource ScrollThumbs}" />
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton x:Name="PageUp" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="false" />
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton x:Name="PageDown" Command="ScrollBar.PageUpCommand" Opacity="0" Focusable="false" />
                                </Track.DecreaseRepeatButton>
                            </Track>
                            <RepeatButton x:Name="IncreaseRepeat" Grid.Row="2" Command="ScrollBar.LineDownCommand" Style="{DynamicResource ScrollButtons}" Cursor="Hand">
                                <Path x:Name="IncreaseArrow" Data="F1 M 3.5,7L 7,0L 0,0L 3.5,7 Z " Fill="{DynamicResource SliderGrad}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </RepeatButton>
                        </Grid>

                        <ControlTemplate.Triggers>
                            <!--<Trigger SourceName="IncreaseRepeat" Property="IsMouseOver" Value="true">
                                <Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="IncreaseArrow" Property="Fill" />
                            </Trigger>
                            <Trigger SourceName="DecreaseRepeat" Property="IsMouseOver" Value="true">
                                <Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="DecreaseArrow" Property="Fill" />
                            </Trigger>
                            <Trigger SourceName="Thumb" Property="IsMouseOver" Value="true">
                                <Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="Thumb" Property="Background" />
                            </Trigger>-->

                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation
                Storyboard.TargetProperty="Opacity"
                To="1" Duration="0:0:0.5" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>

                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation
                Storyboard.TargetProperty="Opacity"
                To="0.6" Duration="0:0:0.5" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>

                            <!--<Trigger SourceName="Thumb" Property="IsDragging" Value="true">
                                <Setter Value="{DynamicResource DarkBrush}" TargetName="Thumb" Property="Background" />
                            </Trigger>
                            <Trigger SourceName="IncreaseRepeat" Property="IsPressed" Value="true">
                                <Setter Value="{DynamicResource DarkBrush}" TargetName="IncreaseArrow" Property="Fill" />
                            </Trigger>
                            <Trigger SourceName="DecreaseRepeat" Property="IsPressed" Value="true">
                                <Setter Value="{DynamicResource DarkBrush}" TargetName="DecreaseArrow" Property="Fill" />
                            </Trigger>-->
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Value="{DynamicResource LayerChild1Brush}" TargetName="IncreaseArrow" Property="Fill" />
                                <Setter Value="{DynamicResource LayerChild1Brush}" TargetName="DecreaseArrow" Property="Fill" />
                                <Setter TargetName="Thumb" Property="Visibility" Value="Collapsed" />
                            </Trigger>
                            <Trigger Property="Orientation" Value="Horizontal">
                                <Setter TargetName="GridRoot" Property="LayoutTransform">
                                    <Setter.Value>
                                        <RotateTransform Angle="-90" />
                                    </Setter.Value>
                                </Setter>
                                <Setter TargetName="PART_Track" Property="LayoutTransform">
                                    <Setter.Value>
                                        <RotateTransform Angle="-90" />
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Width" Value="Auto" />
                                <Setter Property="Height" Value="12" />
                                <Setter TargetName="Thumb" Property="Tag" Value="Horizontal" />
                                <Setter TargetName="DecreaseRepeat" Property="Command" Value="ScrollBar.LineLeftCommand" />
                                <Setter TargetName="IncreaseRepeat" Property="Command" Value="ScrollBar.LineRightCommand" />
                                <Setter TargetName="PageDown" Property="Command" Value="ScrollBar.PageLeftCommand" />
                                <Setter TargetName="PageUp" Property="Command" Value="ScrollBar.PageRightCommand" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style TargetType="{x:Type TextBox}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="MinWidth" Value="120"/>
            <Setter Property="MinHeight" Value="20"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <Border 
                              Name="Border"
                              CornerRadius="2" 
                              Background="Transparent"
                              BorderThickness="1">
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
                                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>










        <!--Group Box-->


        <Style TargetType="GroupBox">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="GroupBox">
                        <Grid Margin="0,0,0,10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="1"/>
                            </Grid.RowDefinitions>

                            <ContentPresenter ContentSource="Header" Grid.Row="0" TextBlock.FontSize="14" TextBlock.FontStyle="Normal"/>
                            <ContentPresenter ContentSource="Content" Grid.Row="1" Margin="5,3,0,10"/>

                            <Border Grid.Row="2" Background="White"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
</Application>
